<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="shortcut icon" href="{$system.logo}">
	<link href="__PUBLIC__/dist/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
	<link href="__PUBLIC__/dist/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
	<link href="__PUBLIC__/dist/css/plugins/iCheck/custom.css" rel="stylesheet">
	<link href="__PUBLIC__/dist/css/animate.min.css" rel="stylesheet">
	<link href="__PUBLIC__/dist/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	<link href="__PUBLIC__/dist/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
	<link href="__PUBLIC__/dist/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" rel="stylesheet">
	<link href="__PUBLIC__/libs/lightbox2/css/lightbox.css" rel="stylesheet"/>
	<style type="text/css">
		.smallImg{
			height:34px
		}
		.text {
			padding-top: 6px;
		}
		input[type="number"] {
			-moz-appearance: textfield;
		}
		#ajax_index_box{
			overflow: scroll;
		}
	</style>
	<block name="css"></block>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-content" style="border-color: #e7eaec;border-width: 4px 0 0;">
					<div class="row">
						<form method="get">
							<div class="col-sm-3 m-b-xs">
								<div class="input-daterange input-group" id="datepicker">
									<input type="text" class=" form-control" name="start_time" value="{$start_time_str}" placeholder="开始时间" onkeyup="filter(this)"/>
									<span class="input-group-addon">到</span>
									<input type="text" class=" form-control" name="end_time" value="{$end_time_str}" placeholder="结束时间" onkeyup="filter(this)"/>
								</div>
							</div>
							<div class="col-sm-1">
								<button type="submit" class="btn btn-primary"><span class="fa fa-search"></span> 确定</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-content" style="border-color: #e7eaec;border-width: 4px 0 0;">
					<div class="row">
						<div class="col-sm-4">销售额：￥{$topData}</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>销售统计</h5>
				</div>
				<div class="ibox-content">
					<div class="row">
						<div class="col-sm-12">
							<div class="chart">
								<div id="statistics" style="height: 400px;"></div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="__PUBLIC__/dist/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/dist/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/dist/js/plugins/peity/jquery.peity.min.js"></script>
<script src="__PUBLIC__/dist/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/dist/js/plugins/iCheck/icheck.min.js"></script>
<script src="__PUBLIC__/dist/js/demo/peity-demo.min.js"></script>
<script src="__PUBLIC__/dist/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="__PUBLIC__/dist/js/plugins/layer/layer.min.js"></script>
<script src="__PUBLIC__/libs/lightbox2/js/lightbox.min.js"></script>
<script src="__PUBLIC__/libs/global.js?rnd=12345678"></script>
<script src="__PUBLIC__/dist/js/plugins/echarts/echarts-all.js"></script>
<script>
    $('#datepicker').datepicker();
    var res = {$res};
    var myChart = echarts.init(document.getElementById('statistics'), 'macarons');
    var data = ["销售金额"];
    option = {
        tooltip: {
            trigger: 'axis'
        },
        toolbox: {
            show: true,
            feature: {
                magicType: {
                    show: true,
                    type: ['line', 'bar']
                },
                saveAsImage: {
                    show: true
                }
            }
        },
        calculable: true,
        legend: {
            data: data
        },
        xAxis: [{
            type: 'category',
            data: res.time
        }],
        yAxis: [{
            type: 'value',
            name: '销售金额',
            axisLabel: {
                formatter: '{value}'
            }
        }],
        series: [{
            name: "销售金额",
            type: 'line',
            data: res.amount
        },
        ]
    };

    myChart.setOption(option);
</script>
<script type="text/javascript">
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
</script>
</body>

</html>